%aside.sidenav-container
  .sidenav-container-top
    / Title for the Admin Panel
    %h6
      = t('admin2.topnav.admin_menu')
    .sidenav-links
      / Dashboard
      %ul.category-title
        %li#dashboard{class: active_li('dashboard')}
          = link_to t('admin2.sidebar.dashboard'), admin2_dashboard_index_path
      / General
      %ul.category-title
        %li
          = link_to t('admin2.sidebar.general_group'), '#general', class: %i[dropdown-toggle], 'aria-controls' => 'general', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
      %ul#general.collapse.subtitle{class: expand_ul('general')}
        %li#essentials{class: active_li('essentials')}
          = link_to t('admin2.sidebar.general.essentials'), admin2_general_essentials_path
        %li#domain
          %a{:href => 'domain.php'} Domain
        %li#privacy{class: active_li('privacy')}
          = link_to t('admin2.sidebar.general.privacy'), admin2_general_privacy_index_path
        %li#staticcontent-mobile{class: active_li('static_content')}
          = link_to t('admin2.sidebar.general.static_content'), admin2_general_static_content_index_path
        %li#adminnotifications-mobile{class: active_li('admin_notifications')}
          = link_to t('admin2.sidebar.general.admin_notifications'), admin2_general_admin_notifications_path

      / Design
      %ul.category-title
        %li
          = link_to t('admin2.sidebar.design_group'), '#design', class: %i[dropdown-toggle], 'aria-controls' => 'design', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
      %ul#design.collapse.subtitle{class: expand_ul('design')}
        %li#logoscolor{class: active_li('logos_color')}
          = link_to t('admin2.sidebar.design.logos_and_color'), admin2_design_logos_color_index_path
        %li#coverphotos{class: active_li('cover_photos')}
          = link_to t('admin2.sidebar.design.cover_photos'), admin2_design_cover_photos_path
        %li#landingpage{class: active_li('landing_page')}
          = link_to t('admin2.sidebar.design.landing_page'), admin2_design_landing_page_index_path
        %li#topbar{class: active_li('topbar')}
          = link_to t('admin2.sidebar.design.topbar'), admin2_design_topbar_index_path
        %li#footer{class: active_li('footer')}
          = link_to t('admin2.sidebar.design.footer'), admin2_design_footer_index_path
        %li#display{class: active_li('display')}
          = link_to t('admin2.sidebar.design.display'), admin2_design_display_index_path
        %li#experimental{class: active_li('experimental')}
          = link_to t('admin2.sidebar.design.experimental'), admin2_design_experimental_index_path
      / Divider
      %hr/
      / Users
      %ul.category-title
        %li
          = link_to t('admin2.sidebar.users_group'), '#users', class: %i[dropdown-toggle], 'aria-controls' => 'users', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
      %ul#users.collapse.subtitle{class: expand_ul('users')}
        %li#manageusers{class: active_li('manage_users')}
          = link_to t('admin2.sidebar.users.manage_users'), admin2_users_manage_users_path(direction: :desc, sort: :join_date)
        %li#userfields
          %a{:href => 'user-fields.php'} User fields
        %li#signuplogin{class: active_li('signup_login')}
          = link_to t('admin2.sidebar.users.signup_login'), admin2_users_signup_login_index_path
        %li#userrights{class: active_li('user_rights')}
          = link_to t('admin2.sidebar.users.user_rights'), admin2_users_user_rights_path
        %li#invitations{class: active_li('invitations')}
          = link_to t('admin2.sidebar.users.invitations'), admin2_users_invitations_path(direction: :desc, sort: :started)
      / Listings
      %ul.category-title
        %li
          = link_to t('admin2.sidebar.listings_group'), '#listings', class: %i[dropdown-toggle], 'aria-controls' => 'listings', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
      %ul#listings.collapse.subtitle{class: expand_ul('listings')}
        %li#managelistings{class: active_li('manage_listings')}
          = link_to t('admin2.sidebar.listings.manage_listings'), admin2_listings_manage_listings_path(direction: 'desc', sort: 'updated')
        %li#categories
          %a{:href => 'categories.php'} Categories
        %li#ordertypes
          %a{:href => 'order-types.php'} Order types
        %li#listingfields
          %a{:href => 'listing-fields.php'} Listing fields
        %li#listingapproval{class: active_li('listing_approval')}
          = link_to t('admin2.sidebar.listings.listing_approval'), admin2_listings_listing_approval_index_path
        %li#listingcomments{class: active_li('listing_comments')}
          = link_to t('admin2.sidebar.listings.listing_comments'), admin2_listings_listing_comments_path
      / Transactions
      %ul.category-title
        %li
          = link_to t('admin2.sidebar.transactions_group'), '#transactionsreviews', class: %i[dropdown-toggle], 'aria-controls' => 'transactionsreviews', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
      %ul#transactionsreviews.collapse.subtitle{class: expand_ul('transactions_reviews')}
        %li#managetransactions{class: active_li('manage_transactions')}
          = link_to t('admin2.sidebar.transactions_reviews.manage_transactions'), admin2_transactions_reviews_manage_transactions_path(direction: :desc, sort: :last_activity)
        %li#viewconversations{class: active_li('conversations')}
          = link_to t('admin2.sidebar.transactions_reviews.view_conversations'), admin2_transactions_reviews_conversations_path(direction: :desc, sort: :last_activity)
        %li#managereviews{class: active_li('manage_reviews')}
          = link_to t('admin2.sidebar.transactions_reviews.manage_reviews'), admin2_transactions_reviews_manage_reviews_path
        %li#configuretransactions{class: active_li('config_transactions')}
          = link_to t('admin2.sidebar.transactions_reviews.config_transactions'), admin2_transactions_reviews_config_transactions_path
      / Divider
      %hr
      / Payment system
      - if PaypalHelper.paypal_active?(@current_community.id) || StripeHelper.stripe_provisioned?(@current_community.id)
        %ul.category-title
          %li
            = link_to t('admin2.sidebar.payment_group'), '#paymentsystem', class: %i[dropdown-toggle], 'aria-controls' => 'paymentsystem', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
        %ul#paymentsystem.collapse.subtitle{class: expand_ul('payment_system')}
          %li#countrycurrency{class: active_li('country_currencies')}
            = link_to t('admin2.sidebar.payment_system.country_currency'), admin2_payment_system_country_currencies_path
          %li#transactionsize
            %a{:href => 'transaction-size.php'} Transaction size
          %li#paypal
            %a{:href => 'paypal.php'} PayPal
          %li#stripe
            %a{:href => 'stripe.php'} Stripe
      / Email
      %ul.category-title
        %li
          = link_to t('admin2.sidebar.emails_group'), '#emails', class: %i[dropdown-toggle], 'aria-controls' => 'emails', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
      %ul#emails.collapse.subtitle{class: expand_ul('emails')}
        %li#emailusers{class: active_li('email_users')}
          = link_to t('admin2.sidebar.emails.email_users'), admin2_emails_email_users_path
        %li#welcomeemail{class: active_li('welcome_emails')}
          = link_to t('admin2.sidebar.emails.welcome_email'), admin2_emails_welcome_emails_path
        %li#automaticnewsletter{class: active_li('newsletters')}
          = link_to t('admin2.sidebar.emails.automatic_newsletter'), admin2_emails_newsletters_path
        %li#customoutgoingaddress
          %a{:href => 'custom-outgoing-address.php'} Custom outgoing address
      / Search & Location
      - if FeatureFlagHelper.location_search_available
        %ul.category-title
          %li
            = link_to t('admin2.sidebar.search_group'), '#searchlocation', class: %i[dropdown-toggle], 'aria-controls' => 'searchlocation', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
        %ul#searchlocation.collapse.subtitle{class: expand_ul('search_location')}
          %li#search{class: active_li('search')}
            = link_to t('admin2.sidebar.search_location.search'), admin2_search_location_search_index_path
          %li#location{class: active_li('locations')}
            = link_to t('admin2.sidebar.search_location.location'), admin2_search_location_locations_path
      / Social media
      %ul.category-title
        %li
          = link_to t('admin2.sidebar.social_media_group'), '#socialmedia', class: %i[dropdown-toggle], 'aria-controls' => 'socialmedia', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
      %ul#socialmedia.collapse.subtitle{class: expand_ul('social_media')}
        %li#imagetags{class: active_li('image_tags')}
          = link_to t('admin2.sidebar.social_media.image_tags'), admin2_social_media_image_tags_path
        %li#twitter{class: active_li('twitter')}
          = link_to t('admin2.sidebar.social_media.twitter'), admin2_social_media_twitter_index_path
      / SEO
      %ul.category-title
        %li
          = link_to t('admin2.sidebar.seo_group'), '#seo', class: %i[dropdown-toggle], 'aria-controls' => 'seo', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
      %ul#seo.collapse.subtitle{class: expand_ul('seo')}
        %li#sitemaprobots{class: active_li('sitemap')}
          = link_to t('admin2.sidebar.seo.sitemap_robots'), admin2_seo_sitemap_index_path
        %li#landingpagemeta{class: active_li('landing_pages')}
          = link_to t('admin2.sidebar.seo.landing_pages'), admin2_seo_landing_pages_path
        %li#searchresultspagesmeta{class: active_li('search_pages')}
          = link_to t('admin2.sidebar.seo.search_pages'), admin2_seo_search_pages_path
        %li#listingpagesmeta{class: active_li('listing_pages')}
          = link_to t('admin2.sidebar.seo.listing_pages'), admin2_seo_listing_pages_path
        %li#categorypagesmeta{class: active_li('category_pages')}
          = link_to t('admin2.sidebar.seo.category_pages'), admin2_seo_category_pages_path
        %li#profilepagesmeta{class: active_li('profile_pages')}
          = link_to t('admin2.sidebar.seo.profile_pages'), admin2_seo_profile_pages_path
        %li#googlesearchconsole{class: active_li('google_console')}
          = link_to t('admin2.sidebar.seo.google_console'), admin2_seo_google_console_index_path
      / Analytics
      %ul.category-title
        %li
          = link_to t('admin2.sidebar.analytics_group'), '#analytics', class: %i[dropdown-toggle], 'aria-controls' => 'analytics', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
      %ul#analytics.collapse.subtitle{class: expand_ul('analytics')}
        %li#googleanalytics{class: active_li('google')}
          = link_to t('admin2.sidebar.analytics.google'), admin2_analytics_google_index_path
        %li#googletagmanager{class: active_li('google_manager')}
          = link_to t('admin2.sidebar.analytics.google_manager'), admin2_analytics_google_manager_index_path
        - if APP_CONFIG.admin_enable_tracking_config
          %li#sharetribeanalytics{class: active_li('sharetribe')}
            = link_to t('admin2.sidebar.analytics.sharetribe'), admin2_analytics_sharetribe_index_path
      / Advanced
      %ul.category-title
        %li
          = link_to t('admin2.sidebar.advanced_group'), '#advanced', class: %i[dropdown-toggle], 'aria-controls' => 'advanced', 'aria-expanded' => 'false', 'data-toggle' => 'collapse', role: :button
      %ul#advanced.collapse.subtitle{class: expand_ul('advanced')}
        %li#customscript{class: active_li('custom_scripts')}
          = link_to t('admin2.sidebar.advanced.custom_script'), admin2_advanced_custom_scripts_path
        %li#deletemarketplace{class: active_li('delete_marketplaces')}
          = link_to t('admin2.sidebar.advanced.delete_marketplace'), admin2_advanced_delete_marketplaces_path
  / Bottom links for branded links
  .sidenav-bottomLinks
    %ul.category-title
      %li
        = link_to t('admin2.sidebar.subscription'), admin_plan_path, rel: :noopener
      %li
        = link_to t('admin2.sidebar.help_center'), 'https://help.sharetribe.com/?utm_source=marketplaceadminpanel&utm_medium=referral&utm_campaign=leftnavi', rel: :noopener, target: :_blank
      %li
        = link_to t('admin2.sidebar.marketplace_guide'), 'https://www.sharetribe.com/academy/guide/?utm_source=marketplaceadminpanel&utm_medium=referral&utm_campaign=leftnavi', rel: :noopener, target: :_blank
      %li
        = link_to t('admin2.sidebar.what_new'), 'https://www.sharetribe.com/products/go/updates?utm_source=marketplaceadminpanel&utm_medium=referral&utm_campaign=leftnavi', rel: :noopener, target: :_blank
